import config from "@/config"
import http from "@/utils/request"

export default {
	pub: {
		status: {
			url: `${config.API_URL}/pub/status`,
			name: "获取最新状态",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		setting: {
			url: `${config.API_URL}/pub/setting`,
			name: "获取配置信息",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		publicKey: {
			url: `${config.API_URL}/pub/publicKey`,
			script: `${config.API_URL}/pub/publicKey.js`,
			name: "公钥",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	},
	my: {
		menu: {
			url: `${config.API_URL}/my/menu`,
			name: "获取我的菜单",
			get: async function(){
				return await http.get(this.url);
			}
		},
		profile: {
			url: `${config.API_URL}/my/profile`,
			name: "获取用户信息",
			get: async function(){
				return await http.get(this.url);
			}
		}
	},
	dic: {
		get: {
			url: `${config.API_URL}/system/dic/get`,
			name: "获取字典数据",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	}
}
